import { ref } from 'vue'
import PageContent from '@/components/page-content'

export function usePageSearch() {
  const pageContentRef = ref<InstanceType<typeof PageContent>>()
  const handleSearchBtnClick = (query: any) => {
    pageContentRef.value?.getPageData(query)
  }
  const handleResetBtnClick = () => {
    pageContentRef.value?.getPageData()
  }

  return { pageContentRef, handleSearchBtnClick, handleResetBtnClick }
}
